import { EventBase } from "../../cccframework/Common/Components/EventBase";
import RopeSprite from "../../cccframework/Common/Components/RopeSprite";
import { gameHelper } from "../../cccframework/Utils/GameHelpler";



const { ccclass, property } = cc._decorator;

@ccclass
export default class ropeComp extends EventBase {

    @property(RopeSprite)
    ropeComp: RopeSprite = null;

    touchMove(touch: cc.Event.EventTouch) {
        super.touchMove(touch)
        this.ropeComp.tailPos = this.ropeComp.node.convertToNodeSpaceAR(gameHelper.getRealTouchWpos(touch));
    }
}
